<!--
 * @Author: sunchao 13250473+sunchao_yf@user.noreply.gitee.com
 * @Date: 2023-07-29 18:02:33
 * @LastEditors: sunchao 13250473+sunchao_yf@user.noreply.gitee.com
 * @LastEditTime: 2023-08-02 09:25:04
 * @FilePath: \VSCode\hn-talent-ump-vue\src\pages\salon\modules\SignInDetail.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <a-modal v-model="visible" title="签到详情" width="1500px" :footer="null">
    <a-card :bordered="false">
        <div>
          <a-form @keyup.enter.native="searchQuery">
            <a-row :gutter="24">
              <a-col :md="8" :sm="8">
                <a-form-item label="姓名" :label-col="labelCol" :wrapper-col="wrapperCol">
                  <a-input v-model="queryParam.name" placeholder="请输入姓名" />
                </a-form-item>
              </a-col>
              <a-col :md="8" :sm="8">
                <a-form-item label="电话号码" :label-col="labelCol" :wrapper-col="wrapperCol">
                  <a-input v-model="queryParam.mobile" placeholder="请输入电话号码" />
                </a-form-item>
            </a-col>
              <a-col :md="8" :sm="8">
                <a-form-item>
                  <a-button type="primary" icon="search" @click="searchQuery()">查询</a-button>
                  <a-button type="primary" icon="reload" style="margin-left: 8px" @click="searchReset()">重置</a-button>
                </a-form-item>
              </a-col>
            </a-row>
          </a-form>
        </div>
        <vxe-grid
            id="SignInDetail"
            ref="vxeTable"
            :row-config="{keyField:'id'}"
            v-bind="options"
            v-on="listeners"
        >
        </vxe-grid>
    </a-card>
  </a-modal>
</template>

<script>
import { VxeTableMixin } from '@/mixins/VxeTableMixin'
import Criteria from '@/utils/criteria'
import { OPERATOR } from '@/store/mutation-types'
import { filterObj } from '@/utils/util'
export default {
  name: 'SignInDetail',
  mixins: [VxeTableMixin],
  data() {
    return {
      visible:false,
      columns: [
        {type: 'seq', width: 40, fixed: 'left'},
        {title: '手机号', field: 'mobile',width: 120},
        {title: '姓名', field: 'name',width: 100},
        {title: '性别', field: 'sex',width: 60},
        {title: '出生年月', field: 'birthMonth',width: 100},
        {title: '专业', field: 'speciality',width: 120},
        {title: '学位', field: 'degree',width: 100},
        {title: '职称', field: 'title',width: 100},
        {title: '毕业院校', field: 'graduation',width: 150},
        {title: '工作单位', field: 'workUnit',width: 150},
        {title: '签到状态', field: 'signIn',width: 100,formatter: 'dictText'},
        {title: '签到时间', field: 'signInTime'}
      ],
      url: {
        list: '/salon/applicants/v1/page'
      },
      customTableToolbar: {
        buttons: [],
        import: false
      },
      elementId: 'apment:SalonDetail:export',
      recordInfo:{}
    }
  },
  methods: {
    getQueryParams(record) {
      if(record){
        this.recordInfo = record
      }
      // 获取查询条件
      const queryParam = new Criteria()
      queryParam.addCriterions(Object.assign({}, filterObj(this.queryParam), this.filters), OPERATOR.LIKE_START)// 过滤参数转换为jpa支持格式
      //会议信息主键
      queryParam.addCriterions({ 'salonId': this.recordInfo.id }, OPERATOR.EQ);
      //签到信息只查询审核通过的
      queryParam.addCriterions({ 'status': "1" }, OPERATOR.EQ);
      this.isorter && queryParam.addOrder(this.isorter)// 增加排序规则
      var param = Object.assign({}, { criteria: queryParam.getEncode() })
      param.pageNo = this.ipagination.currentPage
      param.pageSize = this.ipagination.pageSize
      return filterObj(param);
    },
  }
}
</script>

